#include "qsort.hpp"
#include <iostream>
#include <vector>
#include <time.h>
using namespace std;

void Test1(){
  int arri[] = {1,5,3,6,3,8,2,9};
  vector<int> vc(arri, arri+8); 
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;

  //insert_sort(vc,Less<int>());
  //shell_sort(vc,Less<int>());
  //select_sort(vc);
  //heap_sort(vc,Less<int>());
  //bubble_sort(vc,Less<int>());
  quick_sort(vc,0,vc.size()-1);
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;
}

void Test2(){
  char arrc[] = "acvdsxzf";
  vector<char> vc(arrc, arrc+8); 
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;

  //insert_sort(vc,Less<char>());
  //shell_sort(vc,Less<char>());
  //select_sort(vc);
  //heap_sort(vc,Less<char>());
  //bubble_sort(vc,Less<char>());
  quick_sort(vc,0,vc.size()-1);
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;
}

void Test3(){
  double arrd[] = {1.3,2.4,5.5,1.2,4.6,7.6,3.14,5.26};
  vector<double> vc(arrd, arrd+8); 
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;

  //insert_sort(vc,Less<double>());
  //shell_sort(vc,Less<double>());
  //select_sort(vc);
  //heap_sort(vc,Greater<double>());
  //bubble_sort(vc,Greater<double>());
  quick_sort(vc,0,vc.size()-1);
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;
}

void Test4(){
  vector<int> vc;
  for(int i = 0; i<1000000; ++i)
  {
    int data = rand();
    vc.push_back(data);
  }
  quick_sort(vc,0,vc.size()-1);
}

int main(){
  srand(time(NULL));
  Test4();
  cout << count << endl;
  //Test1();
  //Test2();
  //Test3();
  return 0;
}
